<br>
<h1 class='center'><%= t('sessions.login_header') %></h1>

<% if Rails.application.config.deny_login %>

<div class="row">
  <div class="col-md-6 col-md-offset-3">
    <div class="center-block">
       <%= t('sessions.login_disabled') %>
    </div>
  </div>
</div>

<% else %>

<div class="row">
  <div class="col-md-6 col-md-offset-3">
   <div class="center-block">
    <br>
    <br>
    <br>
    <%= link_to Icon[:'fa-github'] + t('sessions.login_with_github_html'),
                "/auth/github?locale=#{locale}",
                class: 'btn btn-lg btn-social btn-github btn-block',
                method: 'post' %>
    <br><br>
    <%= t('sessions.login_automatic_signup') %>
    <br><br>
    <div class='text-center h2'>- <%= t('sessions.or') %> -</div>
    <br><br>
   </div>
  </div>
</div>

<div class="row">
  <div class="col-md-6 col-md-offset-3">
    <%= form_for(:session, url: login_path) do |f| %>

      <%= f.label :email, t('sessions.email') %>
      <%= f.email_field :email, class: 'form-control' %>

      <%= f.label :password, t('sessions.password') %>
      <%= link_to t('sessions.forgot_password'), new_password_reset_path %>
      <%= f.password_field :password, autocomplete: 'off', class: 'form-control' %>

      <%= f.label :remember_me, t('sessions.remember_me'),
                  class: "checkbox inline" do %>
        <%= f.check_box :remember_me %>
        <span><%= t('sessions.remember_me') %>
              <%= t('sessions.cookie_details_html') %></span>
      <% end %>

      <%= f.hidden_field :provider, value: "local" %>
      <%= f.submit t('sessions.login_custom'), class: "btn btn-lg btn-primary" %>
    <% end %>

    <br><br>
    <%= link_to t('sessions.no_custom'), signup_path %>
    <br>
    <br>
  </div>
</div>
<% end %>
